
import {mapState,mapMutations} from "vuex"
import {useRouter} from "vue-router"
import {computed,reactive,toRefs} from "vue"
import {baseURL} from "@/service/request"
import {roleList,annoList} from "./"
// 全局混入 
export const commonMixins = {
  data(){
    return {
      baseURL,
      roleList,
      annoList
    }
  },
  // setup(){
  //   const state = reactive({
  //     mynum:8899
  //   })
  //   return {
  //     ...toRefs(state)
  //   }
  // },
   mounted(){
    //  console.log("mounted - mounted - test")
   },
   computed:{
    ...mapState(['num','mphone'])
    },
    methods:{
      ...mapMutations(['changeNum','changemphone']),
      gotowhere(name){
        // const router = useRouter() setup
        console.log(this.$router)
        this.$router.push({name})
      }
    },
} 